package com.example.prometheusdemo.controller;

import io.micrometer.core.instrument.Metrics;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("test")
public class TestController {

    @GetMapping("counter")
    public String count() {
        Metrics.counter("demo.test.counter").increment();
        return "success";
    }
}
